/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.publish.dao;

import com.thinkgem.jeesite.common.persistence.CrudDao;
import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import com.thinkgem.jeesite.modules.equipment.entity.EleEquipment;
import com.thinkgem.jeesite.modules.publish.entity.EleTempletPublish;
import com.thinkgem.jeesite.modules.sys.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 资源发布包DAO接口
 * @author unnamed
 * @version 2017-06-04
 */
@MyBatisDao
public interface EleTempletPublishDao extends CrudDao<EleTempletPublish> {

    List<EleTempletPublish> findPublishList(EleTempletPublish eleTemplet);
    void batchInsertTemplet(Map<String,List<EleTempletPublish>> params);

    int delApplyTempletStatus(@Param("templets") String templets, @Param("status") String status);
    int delApprovalTempletStatus(@Param("templets") String templets, @Param("status") String status);
    int bathcUpdateTempletStatus(@Param("templets") String templets, @Param("status") String status, @Param("checker")String checker, @Param("comment")String comment);
    List<EleTempletPublish> findListByEquipmentId(@Param("equipmentId")String equipmentId,@Param("status")String status);
    List<EleTempletPublish> findListByEquipments(@Param("list")List<EleEquipment> list,@Param("status")String status);
    List<EleTempletPublish> findEleTempletForCheck(EleTempletPublish eleTemplet, @Param("users")List<User> list,@Param("status")String status);
    List<EleTempletPublish> findEleTempletForCheck(@Param("users")List<User> list,@Param("status")String status);

    void updatePublishStatus(@Param("publishId")String publishId,@Param("status")String status);

    int delApprovalPublish(@Param("publish") EleTempletPublish publish);
}